<?php
include_once '../inc/config.inc.php';
include_once '../inc/mysqli.inc.php';
include_once '../inc/tool.inc.php';
if(!isset($_GET['id'])||!is_numeric($_GET['id'])){
    skip('fatherModule.php','error','id参数错误！ ');
}

$link=connect();
$query="select *from childModule where referid={$_GET['id']}";
$result=execute($link,$query);
if(mysqli_num_rows($result)){
    skip('fatherModule.php','attention','当前板块下有子版块，请先删除子板块！ ');
}
$query="delete from fathermodule where id={$_GET['id']}";
execute($link,$query);
if(mysqli_affected_rows($link)==1){
    skip('fatherModule.php','ok','删除成功！ ');
}else{
    skip('fatherModule.php','error','删除失败，请重试！ ');
}

?>